import pprint

def l2d(*a,**kw):
    if len(a)==1:
        l = a[0]
    else:
        l = a
    return dict([(i, i) for i in l])

def s2d(s):
    return l2d(s2l(s))

def s2l(s):
    s = s.replace('\r','')
    s = s.replace('\n',' ')
    import re
    s = re.sub(r'\s+',' ',s)
    l = s.split(' ')
    l = filter(lambda s:len(s),l)
    return l

if __name__ == '__main__':

    l = ['a']
    print l2d([1,2,3,4])
    print l2d("a","b","c")

    s = '''
    a
    b
    c
    '''

    s = '''
        a
      b
            c
    '''

    s = '''
      \t  a
      b
            c
    '''


    print s2l(s)



    print s2d(s)

    print s2d('aaa.bbb c d e')

    pprint.pprint(s2d('aaa.bbb c d e aaa'))